package com.mall.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.mall.bean.Cart;
import com.mall.bean.User;
import com.mall.dao.CartDao;
import com.mall.service.ICartService;

@Service("cartService")
public class CartServiceImpl implements ICartService {

	@Resource
	private CartDao cartDao;


	@Override
	public boolean addCart(Cart cart) {

		cartDao.addCart(cart);

		return true;
	}

	@Override
	public User myCart(User user) {
		// TODO Auto-generated method stub
		return cartDao.myCart(user);
	}

	@Override
	public boolean isExistGoods(Cart cart) {
		// TODO Auto-generated method stub
		return cartDao.isExistGoods(cart);
	}

	@Override
	public int delCartGoods(Cart cart) {
		// TODO Auto-generated method stub
		return cartDao.delCartGoods(cart);
	}
}
